package com.manage.platform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * YWD
 * 2025/9/23
 */
@Accessors(chain = true)
@Data
@TableName("t_task")
public class TaskEntity implements Serializable {

    @TableId(type = IdType.AUTO)
    @Schema(description = "任务ID,修改必传")
    private Long id;

    @Schema(description = "创建人用户ID")
    private Long userId;

    @Schema(description = "组织ID(学院/部门)")
    private Long organizeId;

    @Schema(description = "负责人ID")
    private Long assigneeId;

    @Schema(description = "父任务ID(0为顶级任务)")
    private Long parentId;

    @Schema(description = "任务名称")
    private String name;

    @Schema(description = "任务层级(1=一级,2=二级,3=三级,4=四级,5=五级)")
    private Integer level;

    @Schema(description = "优先级(1=低,2=中,3=高,4=紧急)")
    private Integer priority;

    @Schema(description = "任务描述")
    private String description;

    @Schema(description = "年度")
    private String annual;

    @Schema(description = "计划开始时间(yyyy-MM-dd HH:mm:ss)")
    private String planStartTime;

    @Schema(description = "计划完成时间(yyyy-MM-dd HH:mm:ss)")
    private String planEndTime;

    @Schema(description = "截止时间(yyyy-MM-dd HH:mm:ss)")
    private String deadline;

    @Schema(description = "实际完成时间(yyyy-MM-dd HH:mm:ss)")
    private String actualEndTime;

    @Schema(description = "标签(多个标签用逗号分隔)")
    private String tags;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "进度百分比(0-100)")
    private Integer progress;

    @Schema(description = "任务状态(0=未开始,1=进行中,2=已完成,3=未完成)")
    private Integer status;

    @Schema(description = "创建时间")
    private String createTime;

    @Schema(description = "更新时间")
    private String updateTime;

    @TableLogic
    @Schema(description = "是否删除(0=否,1=是)")
    private Integer isDeleted;

}